package com.stadium.web.repository;

import com.stadium.web.domain.MarketActivity;
import java.util.List;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;
/**
 * 营销活动Repository接口
 * 
 * @author ruoyi
 * @date 2020-03-15
 */
public interface MarketActivityRepository extends JpaRepository<MarketActivity, Long>
{

    /**
     * 查询营销活动
     *
     * @param id 营销活动ID
     * @return 营销活动
     */
//    public MarketActivity findByIdAndStatus(Long id, Byte status);


    @Modifying
    @Transactional
    @Query("update #{#entityName} set delflag = ?1  where partyid in ?2")
    Integer updateStatusByIdIn(Byte code, List<Long> ids);

    List<MarketActivity> findByVenueId(Long id);
}
